# Maintainer: Carlo Landmeter <clandmeter@alpinelinux.org>
pkgname=py3-pikepdf
_pyname=pikepdf
pkgver=4.4.1
pkgrel=1
pkgdesc="Python library for reading and writing PDF"
url="https://github.com/pikepdf/pikepdf"
arch="all"
license="MPL-2.0"
depends="py3-lxml py3-pillow py3-packaging python3"
makedepends="
	py3-pybind11
	py3-pybind11-dev
	py3-setuptools
	py3-setuptools-scm-git-archive
	py3-setuptools_scm
	py3-wheel
	python3-dev
	qpdf-dev
	"
source="https://files.pythonhosted.org/packages/source/p/pikepdf/pikepdf-$pkgver.tar.gz"
builddir="$srcdir/$_pyname-$pkgver"
options="!check" # tests fail to import pikepdf

# secfixes:
#   2.9.1-r2:
#     - CVE-2021-29421

build() {
	python3 setup.py build
}

package() {
	python3 setup.py install --prefix=/usr --root="$pkgdir"
}

sha512sums="
1df75b48c5f7b63238d6923ff8ac9e4511794d314be1f92ee2f0284d21a814554e900857f6d31dbdb5bcc13f5c4a03f4dc2d59b618fa737b1bcf4b016fa311b4  pikepdf-4.4.1.tar.gz
"
